import Vue from 'vue'
import ContactServices from './contact-services.vue'
const VueComponent = Vue.extend(ContactServices)

export const toContactServices = (option) => {
    const vm = new VueComponent().$mount()
    vm.type = option.type || ''
    vm.selectList = option.selectList || []
    vm.$on('onchange', (item) => {
        if (option && option.onChange) option.onChange(vm, item)
    })
    vm.$on('sure', (model) => {
        if (option && option.sure) option.sure(vm, model)
    })
    vm.show = true
    return vm
}
